<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>华猫商城</title>
		<style></style>
		<link href="../css/jquery.validator.css" rel="stylesheet">
		<link href="../css/common.css" rel="stylesheet">

		<link href="../plugin/userLib/css/user.css" rel="stylesheet">
		<link href="../plugin/userLib/css/userinfo.css" rel="stylesheet">
		<link href="../plugin/userLib/css/my_user.css" rel="stylesheet">
		<link href="../css/base.css" rel="stylesheet">
		<style>

		</style>
	</head>

	<body>
		<div id="header"></div>
		<div id="headerBox"></div>
		<!--<div id="nav_menu"></div>-->
		<div class="ZZHT-wrap">
			<div class="ZZHT-header" style="border-bottom: 1px solid #ffffff;">
				<div class="ZZHT-shop-nav">
					<div class="ZZHT-nav-box">
						<a href="#">
							<li class="liselect ZZHT-lfloat ZZHT-nav-boxa">用户中心</li>
						</a>
						<div class="ZZHT-clear"></div>
					</div>
				</div>
				<div class="ZZHT-clear"></div>
			</div>
			<div class="ZZHT-main" id="app">
				<div id="user_left"></div>
				<div class="ZZHT-content">
					<div class="msg_main">
						<div class="sections">
							<div class="msg_header bz">
								注册信息
							</div>
							<div class="section_con1 bz">
								<a href="4-1.html">修改头像</a>
								<div class="con1_figure clearfix">
									<img :src="info.userPhoto" alt="" class="con1_img fl">
									<div class="caption1 caption fl">
										<p><span>用户名：</span><span>{{info.userName}}</span></p>
										<p><span>用户ID：</span><span>{{info.userID}}</span></p>
									</div>
									<div class="caption2 caption fl">
										<p><span>手机号：</span><span v-if="info.userPhone">{{info.userPhone.substr(0,4)}}****{{info.userPhone.substr(info.userPhone.length-4,info.userPhone.length)}}</span></p>
										<p><span>用户类型：</span><span>{{info.userType}}</span></p>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div style="clear:both;"></div>
			<br>
		</div>
		<div id="ck3"></div>
		<script src="../js/jquery.min.js"></script>
		<script src="../js/vue.min.js"></script>
		<script src="../plugin/layer/layer.js"></script>
		<script type="text/javascript" src="../js/ljf_base.js"></script>
		<script type="text/javascript">
			var vm = new Vue({
				el:'#app',
				data:{
					info : {},
				}
			});
			$.ajax({//获取用户信息 头像等
				type: "get",
				url: SURL + "users/selectByUsersInfo",
				data: {
					"userId":localStorage.userId,
				},
				dataType: 'json',
				success: function(res) {
					console.log(res);
					if(res.messageCode==200){
						res.entity.userType = switch_userType(res.entity.userType);
						var img = res.entity.userPhoto;
						if(res.entity.userPhoto.substr(0,4)!='http'){
							img = imgUrl + res.entity.userPhoto;
						}
						res.entity.userPhoto = img; 
						vm.info = res.entity;
						Vue.nextTick(function(){
							imgError();
						})
					}else{
						layer.msg(res.message);
					}
					
				}
			});
		</script>
	</body>

</html>